<?php echo $this->element('menu', array("active" => "10.a"));?>
<ul class="breadcrumb">
        <li>
          <?php echo $this->Html->link(__('Shop  ', true), array('action' => 'index'), array('class'=>'fist_link'));?>
        </li>
        <li>
           <a href="#" >Orders</a>
        </li>
        <li>
          <a href="#" >View order</a>
        </li>
      </ul>
<div id="content">
<div id="left" class="hight_resize m_t_15" >
<table width="100%">
<tr>
    <td width="80%" nowrap="nowrap"><b><?php echo $order['Order']['created'];?> - <?php echo $order['Agent']['first_name']." ".$order['Agent']['last_name'];?> - <?php $y=0; $pirce = 0;foreach ($order['OrderPart'] as $order_part):  $y++;  $pirce = $pirce + $order_part['Part']['price'];endforeach; echo $pirce." USD";?></b></td>
    <td width="20%"  nowrap="nowrap" align="right">Order number</td>
</tr>
<tr>
    <td width="80%" nowrap="nowrap"> <?php echo $order['Order']['shipping_to'];?></td>
    <td width="20%"  nowrap="nowrap" align="right">
        <a class="bt f_r m_t_15 w85" href="#">Mark pending</a>
        <a class="bt f_r w85" href="#">Mark Dispatched</a>
    </td>
    
</tr>
<tr>
<td width="20%"  nowrap="nowrap" align="left" colspan="2">
        Order items
    </td>
</tr>
</table>
  <div class="table table_p_15_2 boder m_b_15">
  	
    <table width="100%"  cellpadding="0" cellspacing="0" align="right">
      
      <thead>
        <tr>
          <td >Item</td>
          <td >Qty</td>
          <td>Pirce</td>
        </tr>
      </thead>
      <tbody>
       <?php foreach ($order["OrderPart"] as $order_part): ?>
        <tr >
          
          <td ><?php echo $order_part['Part']['name']; ?></td>
          <td><?php echo $order_part['sum']?></td>
          <td ><?php echo $order_part['Part']['price']; ?></td>
        </tr>
		<?php endforeach; ?>
      </tbody>
    </table>
  </div>
  
</div>
<div id="right" class="hight_resize" >
  <fieldset class="form">
    <form>
      <div class="input">
        <label class="w90">Contact name:</label>
        <input type="text" value="" class="w140"/>
        <div class="error-message">Error message will be put here</div>
      </div>
      <div class="input">
        <label class="w90">Company:</label>
        <input type="text" value="" class="w140"/>
      </div>
      <div class="input">
        <label class="w90">Email:</label>
        <input type="text" value="" class="w140"/>
      </div>
      <div class="input">
        <label class="w90">Phone:</label>
        <input type="text" value="" class="w140"/>
      </div>
      <input type="submit" value="Find order" class="bt bt_search" />
    </form>
  </fieldset>
</div>
</div>